    var canvasElement;
    var minWidth = 1000;
    var widthFactor = 0.8;
    var heightFactor = 0.8;

    var canvasWidth;
    var canvasHeight;
	init();
	function init(){
        var w = window,
            d = document,
            e = d.documentElement,
            g = d.getElementsByTagName('body')[0];
        canvasWidth = w.innerWidth;
        canvasHeight = w.innerHeight;

        if (canvasWidth * widthFactor < minWidth)
            widthFactor = 1;

        canvasWidth = canvasWidth * widthFactor;
        canvasHeight = canvasHeight * heightFactor;

		canvasElement = document.getElementById('mainCanvas');
        canvasElement.width = canvasWidth;
        canvasElement.height = canvasHeight;

        console.log("cw : " + canvasWidth + ", max : " + canvasWidth);

        sheetengine.scene.init(canvasElement, {w:canvasWidth,h:canvasHeight});
        /*sheetengine.drawObjectContour = true;*/



	}
	

